/*******************************************************************/
/* @ All Rights Reserved Copyright (C) 2014 broada,Co.,Ltd.        */
/*                                                                 */
/*  NAME      = apmtest_comm.h                                     */
/*  NOTE      =                                                    */
/*  DATE      = 2016/02/04 by songbb                               */
/*******************************************************************/

#ifndef __T_APMTEST_COMM_H_
#define __T_APMTEST_COMM_H_

typedef int (*fn_session_destory)(void *p_session_private);

void apmtest_free(void **pp_buffer);

int apmtest_hex_string_to_bin(const char *hex_string, char *buffer, size_t buffer_size);

int apmtest_create_ct(Conntrack **pp_st_conn, fn_session_destory p_session_destory, char *src_ip,
                      char *dst_ip, unsigned short src_port, unsigned short dst_port);

void apmtest_destroy_ct(Conntrack **pp_st_conn);

void list_report_node_free(Frlist_node *p_st_node);

int apmtest_create_apm_packet(Apm_packet **pp_st_packet, char *p_payload, unsigned int ui_payload_len, char *src_ip,
                              char *dst_ip, unsigned short src_port, unsigned short dst_port, struct timeval st_timestamp);

void apmtest_destroy_apm_packet(Apm_packet **pp_st_packet);

#endif
